package com.bw.eureka.jpa.dao;

import com.bw.eureka.jpa.entity.UserEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author qpxbo
 */
public interface UserDao extends JpaRepository<UserEntity,Integer> {

    public List<UserEntity> findByNameLike(String name);

    public List<UserEntity> findByUsernameAndPassword(String username,String password);

    public Page<UserEntity> findAll(Specification<UserEntity> specification, Pageable pageable);

}
